package guowenlong.golf.ui.friendlymatch;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.OnClick;
import guowenlong.golf.R;
import me.wenlong.mixutils.mvp.BaseActivity;

/**
 * des   : 描述
 * author: Administrator
 * email : guowenlong20000@gmail.com
 * time  : 2017年05月02日 上午 2:04.
 */

public class PlaySettingActivity extends BaseActivity {

  @BindView(R.id.tv_back)
  TextView tvBack;
  @BindView(R.id.ll_bigan_play_setting)
  LinearLayout llBiganPlaySetting;
  @BindView(R.id.ll_bidong_play_setting)
  LinearLayout llBidongPlaySetting;
  @BindView(R.id.tv_add_play_setting)
  TextView tvAddPlaySetting;

  @Override
  protected int getContentView(Bundle savedInstanceState) {
    return R.layout.activity_play_setting;
  }

  @Override
  protected void initView(Bundle savedInstanceState) {

  }

  @Override
  protected void initData() {

  }

  @OnClick({R.id.tv_back, R.id.ll_bigan_play_setting, R.id.ll_bidong_play_setting,
      R.id.tv_add_play_setting})
  public void onViewClicked(View view) {
    switch (view.getId()) {
      case R.id.tv_back:
        finish();
        break;
      case R.id.ll_bigan_play_setting:
        Intent intent1 = new Intent(this, FriendlyMatchActivity.class);
        intent1.putExtra("action","比杆");
        setResult(RESULT_OK,intent1);
        finish();
        break;
      case R.id.ll_bidong_play_setting:
        Intent intent2 = new Intent(this, FriendlyMatchActivity.class);
        intent2.putExtra("action", "比洞");
        setResult(RESULT_OK, intent2);
        finish();
        break;
      case R.id.tv_add_play_setting:
        Intent intent3 = new Intent(this, AddPlayActivity.class);
        startActivityForResult(intent3,1);
        break;
    }
  }

  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (resultCode == RESULT_OK){
      switch (requestCode){
        case 1:
          break;
      }
    }
    super.onActivityResult(requestCode, resultCode, data);
  }
}
